package com.iot08.api.service;

import com.iot08.common.entity.app.DeviceSingleChatGroupMessage;
import com.iot08.common.service.base.BaseService;
import com.iot08.common.utils.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author cwj
 * @description
 * @date 2025/7/6 15:38
 **/
@Slf4j
@Service
public class DeviceSingleChatGroupMessageService extends BaseService<DeviceSingleChatGroupMessage> {

    /**
     * @description 添加设备对设备的单聊记录
     * @author cwj
     * @param [message]
     * @return void
     * @date @time 2025/7/6 17:29
     **/
    public void add(DeviceSingleChatGroupMessage message) {
        message.setExpiryAt(DateUtil.getSystemExpiryAt());
        message.setTimestamp(DateUtil.nowTimestampToDouble());
        this.save(message);
    }
}
